//
// Created by deepin on 2020/11/2.
//
#include <iostream>
using namespace std;
/*
int main ()
{
   int rats = 101;
   int & rodents = rats; // 引用变量 使两个变量指向同一个位置 引用变量声明的时候必须初始化 而指针则可以先声明再初始化
   // 指针的地址默认是可以随意更改的 引用变量初始化之后则不能修改其引用的地址
    // 错误示范
    */
/* int a;
     int & b;
     b=a;*//*

    cout << "rats = " << rats;
   cout << "rodents" << rodents << endl;
   rodents ++;
   rats++;
   cout << "rats= " << rats;
   cout << ", rodents = "<<rodents<<endl;
   cout << "rats address = " << &rats;
   cout << ",rodents address = " << &rodents<< endl;
   return 0;
}*/
